//
//  FBD_FMDBTool.h
//  baodongPro
//
//  Created by feng on 16/3/5.
//  Copyright © 2016年 proper. All rights reserved.
//

#define USER_Document  [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject]
#import <Foundation/Foundation.h>
#import <FMDB/FMDB.h>
@interface FBD_FMDBTool : NSObject






/**
 *      @author 冯宝东
 *
 *      单例模式的类构造方法
 *
 *      @return 单例 FBD_FMDBTool
 */
+(instancetype)defaultTool;
/**
 *      @author 冯宝东
 *
 *      给一个名字创建一个数据库
 *
 *      @param dataBaseName 数据库的名字
 *
 *      @return 是否创建成功
 */
+(FMDatabase*)db_yxCreateDataBaseWithName:(NSString*)dataBaseName;


/**
 *      @author 冯宝东
 *
 *      给一个名字创建一张表
 *
 *      @param tableName 表明
 *
 *      @return 是否成功创建
 */
+(BOOL)db_yxCreateTableWithName:(NSString*)tableName;

-(BOOL)db_yxInsertTableWithName:(NSString *)tableName andName:(NSString*)name withCityId:(NSInteger)cityId;

+(BOOL)db_yxInsertTableWithName:(NSString *)tableName andName:(NSString*)name withCityId:(NSInteger)cityId;

-(BOOL)db_yxDeleteTableViewName:(NSString *)tableName withCityId:(NSInteger)cityId;

+(BOOL)db_yxDeleteTableViewName:(NSString *)tableName withCityId:(NSInteger)cityId;

-(NSMutableArray*)db_yxSearchTableViewName:(NSString*)tableName;
+(NSMutableArray*)db_yxSearchTableViewName:(NSString*)tableName;


@end
